﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ManageSports.aspx.cs" Inherits="TsWeb.Sports.ManageSports" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>


<asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" runat="server">
    <div>
        <ul>
            <div class="accordion" id="accordion2">
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <li class="nav-header" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
                            Gestión de deportes</li>
                    </div>
                    <div id="collapseOne" class="collapse in">
                        <div class="accordion-inner">
                            <h6>
                                Crear nuevo deporte</h6>

                                  <asp:Button ID="ButtonCreateSport" runat="server" Text="Nuevo deporte" OnClick="ButtonCreateSport_Click"   CssClass="btn-success right" />
                        </div>
                    </div>
        </ul>
    </div>
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
   <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/jquery-1.9.1.js" />
            <asp:ScriptReference Path="~/Scripts/bootstrap.min.js" />
              <asp:ScriptReference Path="~/Scripts/uploadfile.js" />
        </Scripts>
    </asp:ScriptManager>
    <p>
    </p>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <Triggers>
            <asp:PostBackTrigger ControlID="UserButton" />
        </Triggers>

        <ContentTemplate>
            <asp:GridView ID="SportsGrid" runat="server" AutoGenerateColumns="False" OnRowCommand="SportsGrid_RowCommand"
                CssClass="table table-hover table-striped" GridLines="None">
                <Columns>
                    <asp:BoundField DataField="Name" HeaderText="Nombre" />
                    <asp:ButtonField ButtonType="Link" CommandName="EditCommand" Text="Editar" />
                    <asp:ButtonField ButtonType="Link" CommandName="DeleteCommand" Text="Eliminar" />
                </Columns>
            </asp:GridView>
            <br />
          
            <p>
            </p>
            <asp:Panel ID="Panel1" runat="server" />

           
            <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                aria-hidden="true">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        ×</button>
                    <h3 id="myModalLabel">
                        Gestión de deportes
                        </h3>
                </div>
                <div class="modal-body">
                     <p>
                            <asp:Label ID="SportNameLabel" runat="server" AssociatedControlID="SportNameTxt">Nombre:</asp:Label>
                            <asp:TextBox ID="SportNameTxt" runat="server" CssClass="textEntry"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="SportNameRequired" runat="server" ControlToValidate="SportNameTxt"
                                CssClass="failureNotification" ErrorMessage="El deporte debe tener un nombre."
                                ToolTip="Nombre del deporte" ValidationGroup="MangeSportSummaryValidationGroup">*</asp:RequiredFieldValidator>
                        </p>
                        <p class="submitButton">
                            
                            
                        </p>

                </div>
                <div class="modal-footer">
                    
                    <asp:Button ID="UserButton" runat="server" Text="Actualizar deporte" CssClass="btn btn-primary"
                        OnClick="UpdateSportButton_Click" />
                </div>
            </div>



        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
